package com;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.liu.po.UserInfo;
import com.liu.service.UserInfoService;

public class test {
	/**
	 * 开启二级缓存配置
	 * @param args
	 */
	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
		UserInfoService UserInfoService = (UserInfoService) applicationContext.getBean("userInfoServiceImpl");
//		System.out.println(UserInfoService);
//		UserInfo userInfo = new UserInfo();
//		userInfo.setUserName("王五");
//		userInfo.setUserSex("男 ");
//		boolean addUser = UserInfoService.addUser(userInfo);
//		System.out.println(addUser);
		UserInfo userInfo = UserInfoService.queryUserById(1);
		System.out.println(userInfo);
		UserInfo userInfo2 = UserInfoService.queryUserById(1);
		System.out.println(userInfo2);
	}
}
